package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: Shreyansh
 * Date: 22/8/13
 * Time: 12:37 PM
 * To change this template use File | Settings | File Templates.
 */
public class MemberDetails {
    public void getMemberDetails() {
        if(LoginManager.isLogged ==false)
        {
            System.out.println("Please talk to a Librarian. Thank you");
        }
        else
        {
            UserList userList=new UserList();
            for(User user:userList.getUserList())
            {
                if(user.userName.equals(LoginManager.userName))
                {   String heading=String.format("%15s %25s %20s","Name","Email-id","Phone-num");
                    System.out.println(heading);
                    String memDetail=String.format("%15s %25s %20s",user.name,user.emailId,user.phoneNum);
                    System.out.println(memDetail);
                }
            }
        }
    }

}
